<?php
define( '_JEXEC', 1 );
//define('JPATH_BASE', '/var/www/vhosts/mysalonprints.com/httpdocs/' );
define('JPATH_BASE', '../../' );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;

/**
 * CREATE THE APPLICATION
 *
 * NOTE :
 */

$mainframe =& JFactory::getApplication('site');

/**
 * INITIALISE THE APPLICATION
 *
 * NOTE :
 */
// set the language
$mainframe->initialise();
$color = JRequest::getVar('color');
if (is_readable( 'colors/'.$color.'.ini' ) )
{
	$content = file_get_contents( JPATH_BASE.'templates/layout1/colors/'.$color.'.ini');
}else{
	$content = file_get_contents( JPATH_BASE.'templates/layout1/colors/default.ini');
}

$params = new JParameter($content);
$params = $params->_registry['_default']['data'] ;

$data = array();
$data2 = array();
foreach($params as $key=>$value){
	$data[$key]  = $value;
	$data2[] = '"'.$key.'":"'.$value.'"';	
}
//echo json_encode($data);
//echo '<hr/>';
echo '{'.implode(',',$data2).'}';

?>